<template>
	<view class="padding-rpx_25">
		<view class="bgColor_ffffff border-radius-rpx_10 padding-rpx_25">
			<view class="flex_row_c_c">
				<text class="QS-text weight">示例</text>
			</view>
			<QS-P></QS-P>
			
			<QS-Button theme="primary" @click="click">改变QS-BackTop显示状态</QS-Button>
			
			<QS-P></QS-P>
			<text class="QS-text color_808080 word-break_break-all">{{info}}</text>
		</view>
		<QS-BackTop setContext></QS-BackTop>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: `pageContext为QS组件公共功能\n只要传setContext属性为true, 则可使用\nuni.$qs.pageRoots.getPage(this, '组件名称')获取该组件实例, 进而操作其方法`
			}
		},
		methods: {
			click() {
				const backTopVm = uni.$qs.pageRoots.getPage(this, 'QS-BackTop');
				if(backTopVm.showBl) backTopVm.hide();
				else backTopVm.show();
			}
		}
	}
</script>

<style>

</style>
